import { createRequestTypes } from '@UTILS/reduxHelper'
export const GET_MY_MEDITATION_SUMMARY = createRequestTypes('GET_MY_MEDITATION_SUMMARY')
export const GET_SHARABLE_MEDITATION = createRequestTypes('GET_SHARABLE_MEDITATION')
export const SHARE_MEDITATION = createRequestTypes('SHARE_MEDITATION')
export const RESET_SHARE = createRequestTypes('RESET_SHARE')
export const GET_MEDITATION_DETAIL = createRequestTypes('GET_MEDITATION_DETAIL')
export const SET_DURATION_TIME = createRequestTypes('SET_DURATION_TIME')
export const PLAY_MEDITATION_AUDIO = createRequestTypes('PLAY_MEDITATION_AUDIO')
export const STOP_MEDITATION_AUDIO = createRequestTypes('STOP_MEDITATION_AUDIO')
export const RESET_OUTER_PARAMS = createRequestTypes('RESET_OUTER_PARAMS')
export const SET_OUTER_TOTAL_TIME = createRequestTypes('SET_OUTER_TOTAL_TIME')
export const SET_CURRENT_TIME = createRequestTypes('SET_CURRENT_TIME')
export const GET_MEDITATION_INTRO = createRequestTypes('GET_MEDITATION_INTRO')
export const GET_MEDITATION_LIST = createRequestTypes('GET_MEDITATION_LIST')
export const GET_TAG_MEDITATIONS = createRequestTypes('GET_TAG_MEDITATIONS')

export default {
  dispatchGetMyMeditationSummary() {
    return {
      type: GET_MY_MEDITATION_SUMMARY.REQUEST,
    }
  },
  dispatchResetOuterParams() {
    return {
      type: RESET_OUTER_PARAMS.REQUEST,
    }
  },
  dispatchPlayMeditationAudio() {
    return {
      type: PLAY_MEDITATION_AUDIO.REQUEST,
    }
  },
  dispatchStopMeditationAudio(finished) {
    return {
      type: STOP_MEDITATION_AUDIO.REQUEST,
      finished
    }
  },
  dispatchSetOuterTotalTime(totalTime) {
    return {
      type: SET_OUTER_TOTAL_TIME.REQUEST,
      totalTime
    }
  },
  dispatchSetCurrentTime(currentTime) {
    return {
      type: SET_CURRENT_TIME.REQUEST,
      currentTime
    }
  },
  dispatchGetSharableMeditation(reset) {
    return {
      type: GET_SHARABLE_MEDITATION.REQUEST,
      reset
    }
  },
  dispatchResetShare() {
    return {
      type: RESET_SHARE.REQUEST,
    }
  },
  dispatchShareMeditation(payload) {
    return {
      type: SHARE_MEDITATION.REQUEST,
      payload,
    }
  },
  dispatchGetMeditationDetail(payload) {
    return {
      type: GET_MEDITATION_DETAIL.REQUEST,
      payload,
    }
  },
  dispatchSetDurationTime(durationTime) {
    return {
      type: SET_DURATION_TIME.REQUEST,
      durationTime,
    }
  },
  dispatchGetMeditationIntro() {
    return {
      type: GET_MEDITATION_INTRO.REQUEST,
    }
  },
  dispatchGetMeditationList() {
    return {
      type: GET_MEDITATION_LIST.REQUEST,
    }
  },
}
